import request from '@/utils/request'

export function getPostPage(query) {
    return request({
        url: "admin/post/page",
        method: "get",
        params: query
    });
}

export function deletePostByIds(ids) {
    return request({
        url: `admin/post/delete/${Array.isArray(ids) ? ids.join(',') : ids}`,
        method: "delete"
    })
}

export function getPostById(postId) {
    return request({
        url: "admin/post/getPostById",
        method: "get",
        params: {postId}
    });
}